﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Kandy/K_Master.master" AutoEventWireup="true" CodeFile="K_Issue_Request.aspx.cs" Inherits="Kandy_K_Issue_Request" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<style type="text/css">
        .style2
        {
            width: 1051px;
        }
        .style3
        {
            width: 681px;
        height: 41px;
    }
        .style4
        {
            width: 266px;
        }
        .style6
        {
            width: 164px;
        }
        .style7
        {
            width: 625px;
        height: 41px;
    }
        .style8
        {
        }
        .style9
        {
            width: 266px;
            height: 19px;
        }
        .style10
        {
            width: 164px;
            height: 19px;
        }
        .style11
        {
            height: 19px;
        }
    .style12
    {
        width: 266px;
        height: 41px;
    }
    .style13
    {
        width: 164px;
        height: 41px;
    }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<table class="style2">
        <tr>
            <td class="style9">
                </td>
            <td class="style10">
                </td>
            <td colspan="2" class="style11">
                </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td class="style6">
                     <strong>
                     <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Issue Code">
                </dx:ASPxLabel>
                     </strong>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" 
                   >
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="style9">
                </td>
            <td class="style10">
                </td>
            <td colspan="2" class="style11">
                </td> 
        </tr>
        <tr>
            <td class="style8" colspan="4" width="100%">

                <asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="False" 
                BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" 
                CellPadding="4" CellSpacing="2" ForeColor="Black" 
              
              ShowFooter="True" 
                Width="100%" onrowcommand="Gridview1_RowCommand1" 
                onrowdeleting="Gridview1_RowDeleting">
                <Columns>
                
                    
                    <asp:TemplateField HeaderText="Item">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"  ClientIDMode='Static' 
                                DataSourceID="SqlDataSource1" DataTextField="Pro_Name" DataValueField="Pro_ID"  Width="200px"
                                onselectedindexchanged="DropDownList3_SelectedIndexChanged1">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                                SelectCommand="SELECT DISTINCT [Pro_ID], [Pro_Name] FROM [Tbl_Product] order by Pro_Name 
                                ASC">
                            </asp:SqlDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Stock Code" Visible="false">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True" 
                                DataSourceID="SqlDataSource2" DataTextField="Sto_ID" DataValueField="Sto_ID" Width="50px" 
                                onselectedindexchanged="DropDownList4_SelectedIndexChanged1">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                                SelectCommand="SELECT [Sto_ID] FROM [Tbl_Stock] WHERE ([Pro_ID] = @Pro_ID)">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="DropDownList3" Name="Pro_ID" 
                                        PropertyName="Text" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </ItemTemplate>
                         </asp:TemplateField>
                       <asp:TemplateField HeaderText="Product ID">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox7" Width="50px" runat="server" ReadOnly="true" BackColor="#CED4DF" ForeColor="Black"></asp:TextBox>
                        </ItemTemplate>
                        
                    </asp:TemplateField>

                 
                    <asp:TemplateField HeaderText="Description">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        </ItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="Brand ">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox8" runat="server" ReadOnly="true" BackColor="#CED4DF" ForeColor="Black"></asp:TextBox>
                        </ItemTemplate>
                        </asp:TemplateField>
                         
                    <asp:TemplateField HeaderText="Unit Cost" Visible="false">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" BackColor="#CED4DF" ForeColor="Black" 
                                ReadOnly="True" Width="50px"></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Unit Selling Price">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox6" runat="server" BackColor="#CED4DF" ForeColor="Black" 
                                ReadOnly="True" Width="70px"></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity" >
                        <ItemTemplate>
                             <asp:TextBox ID="TextBox4" runat="server" AutoPostBack="True" Width="50px" 
                                ontextchanged="TextBox4_TextChanged"  ></asp:TextBox>

                        </ItemTemplate>
                       
                        
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Line Total">
                        <ItemTemplate> 
   
                            <asp:TextBox ID="TextBox5" runat="server" BackColor="#CED4DF" ></asp:TextBox>
                        </ItemTemplate>
                        <FooterStyle HorizontalAlign="Right" />
                        <FooterTemplate>
                            <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click1" 
                                Text="Add New Row" />
                        </FooterTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowDeleteButton="True" />
                </Columns>
                <FooterStyle BackColor="#CCCCCC" />
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
                <RowStyle BackColor="White" />
                <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />
            </asp:GridView></td>
        </tr>
        <tr>
            <td class="style9">
                </td>
            <td class="style10">
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" ClientIDMode="AutoID" 
                            CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                            Font-Bold="True" Font-Size="Medium" ForeColor="#0000CC" 
                    Text="Total">
                        </dx:ASPxLabel>
                </td>
            <td colspan="2" class="style11">
                         <dx:ASPxTextBox ID="ASPxTextBox2" runat="server" 
                    Width="150px" BackColor="#CED4DF" ReadOnly="True" CssClass="style27" >
                    <ValidationSettings>
                        <RequiredField ErrorText="Please Enter Order Details" IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
                </td>
        </tr>
        <tr>
            <td class="style12">
            <dx:ASPxImage ID="ASPxImage1" runat="server" Height="18px" 
                ImageUrl="~/images/green-check-mark-clip-art.jpg" Visible="False">
            </dx:ASPxImage>
                <dx:ASPxLabel ID="ASPxLabel3" runat="server" ForeColor="#33CC33">
                </dx:ASPxLabel>
            </td>
            <td class="style13">
                <strong>
                <dx:ASPxLabel ID="ASPxLabel4" runat="server" ForeColor="Red" Visible="False">
                </dx:ASPxLabel>
                </strong></td>
            <td class="style7">
                </td>
            <td class="style3">
                <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Text="Issue Request" 
                    Height="16px" style="margin-left: 35px" Width="138px" 
                    onclick="ASPxButton1_Click1">
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td colspan="2">
                &nbsp;</td>
        </tr>
    </table>
                  
                  <br />
</asp:Content>

